package ks32.crosswalk_native;

import android.content.Context;
import android.util.Log;

import com.freeview.fvadpter.FvadpterJni;
import com.freeview.fvadpter.callController.CallController;

import org.chromium.base.ApplicationStatus;
import org.xwalk.core.XWalkApplication;

public class App extends XWalkApplication {
    private static Context mContext;
    private static App app = null;
    @Override
    public void onCreate() {

        super.onCreate();

        try {
            mContext = getApplicationContext();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        ApplicationStatus.initialize(this);
        //判断SDK是否已经初始化
        if (!FvadpterJni.getInstance().isInit()){
            boolean isSucceed = FvadpterJni.getInstance().init(this); //初始化设备
            Log.i("","是否初始化SDK成功? "+isSucceed);
        }
        app = this;

    }

    public static Context getContext(){
        return mContext;
    }
    public static App getApp() {
        return app;
    }
}